<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第二次大作业-排行榜</title>
    <style>
        /* 基础样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Microsoft YaHei", sans-serif;
        }
        body {
            background-color: #f5f5f5;
        }

        /* 页面容器 - 响应式核心 */
        .page {
            max-width: 640px;
            margin: 0 auto;
            background-color: white;
        }

        /* 顶部导航区域 */
        .top {
            padding: 15px;
        }
        .top-title {
            font-size: 18px;
            font-weight: bold;
            text-align: center;
            color: #333;
            margin-bottom: 15px;
        }

        /* 标签栏样式 */
        .tabs ul {
            display: flex;
            list-style: none;
        }
        .tab-item {
            flex: 1;
            text-align: center;
            padding: 8px 0;
            font-size: 14px;
            color: #666;
        }
        .tab-active {
            color: #ff6b00;
            border-bottom: 2px solid #ff6b00;
        }

        /* 分类栏样式 */
        .cats {
            margin: 15px 0;
            padding: 0 15px;
        }
        .cat-item {
            display: inline-block;
            padding: 5px 12px;
            background-color: #f5f5f5;
            border-radius: 15px;
            font-size: 12px;
            color: #666;
            margin-right: 10px;
        }
        .cat-active {
            background-color: #ff6b00;
            color: white;
        }

        /* 实事列表样式 */
        .list {
            padding: 0 15px 15px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* 实事卡片样式 */
        .sku {
            display: block;
            text-decoration: none;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            background-color: white;
        }

        /* 实事内容区（定位基准） */
        .content {
            position: relative;
        }

        /* 图片容器样式 */
        .cover {
            width: 100%;
        }
        /* 实事图片样式 */
        .cover-img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* 排名标识图片 */
        .cover-rank {
            position: absolute;
            top: 10px;
            left: 10px;
            width: 30px;
            height: 30px;
        }

        /* 实事信息区域 */
        .info {
            padding: 12px;
        }
        .info-title {
            font-size: 14px;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
        }

        /* 互动数据容器 */
        .stats {
            display: inline-flex;
            align-items: center;
            gap: 15px;
            float: right;
        }
        /* 单个数据项 */
        .stat-item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            color: #666;
        }
        .stat-item span {
            font-size: 16px;
        }
    </style>
</head>
<body>
    <div class="page">
        <!-- 顶部导航区域 -->
        <header class="top">
            <div class="top-title">排行榜</div>
            <!-- 标签栏 -->
            <div class="tabs">
                <ul>
                    <li class="tab-item tab-active">好文精选</li>
                    <li class="tab-item">热门资讯</li>
                </ul>
            </div>
            <!-- 分类栏 -->
            <div class="cats">
                <span class="cat-item cat-active">文章</span>
                <span class="cat-item">视频</span>
                <span class="cat-item">图集</span>
            </div>
        </header>

        <!-- 实事列表主体 -->
        <main class="list">
            <!-- 实事卡片 1 -->
            <a href="#" class="sku">
                <div class="content">
                    <!-- 图片区域：排名1标识+通用图片 -->
                    <div class="cover">
                        <img src="https://picsum.photos/30/30?random=1" alt="排名1标识" class="cover-rank">
                        <img src="https://picsum.photos/600/300?random=10" alt="实事图片1" class="cover-img">
                    </div>
                    <!-- 信息区域 -->
                    <div class="info">
                        <div class="info-title">2024年全球人工智能发展报告发布，多项技术突破引关注</div>
                        <div class="stats">
                            <div class="stat-item">
                                <span>💬</span>
                                <span>238</span>
                            </div>
                            <div class="stat-item">
                                <span>👍</span>
                                <span>1562</span>
                            </div>
                        </div>
                    </div>
                </div>
            </a>

            <!-- 实事卡片 2 -->
            <a href="#" class="sku">
                <div class="content">
                    <!-- 图片区域：排名2标识+通用图片 -->
                    <div class="cover">
                        <img src="https://picsum.photos/30/30?random=2" alt="排名2标识" class="cover-rank">
                        <img src="https://picsum.photos/600/300?random=20" alt="实事图片2" class="cover-img">
                    </div>
                    <!-- 信息区域 -->
                    <div class="info">
                        <div class="info-title">我国首条跨海高铁全线贯通，预计年底正式开通运营</div>
                        <div class="stats">
                            <div class="stat-item">
                                <span>💬</span>
                                <span>196</span>
                            </div>
                            <div class="stat-item">
                                <span>👍</span>
                                <span>1245</span>
                            </div>
                        </div>
                    </div>
                </div>
            </a>

            <!-- 实事卡片 3 -->
            <a href="#" class="sku">
                <div class="content">
                    <!-- 图片区域：排名3标识+通用图片 -->
                    <div class="cover">
                        <img src="https://picsum.photos/30/30?random=3" alt="排名3标识" class="cover-rank">
                        <img src="https://picsum.photos/600/300?random=30" alt="实事图片3" class="cover-img">
                    </div>
                    <!-- 信息区域 -->
                    <div class="info">
                        <div class="info-title">国际气候大会达成新协议，各国承诺加强碳排放管控</div>
                        <div class="stats">
                            <div class="stat-item">
                                <span>💬</span>
                                <span>152</span>
                            </div>
                            <div class="stat-item">
                                <span>👍</span>
                                <span>987</span>
                            </div>
                        </div>
                    </div>
                </div>
            </a>
        </main>
    </div>
</body>
</html>